// import { defaultRoutePath } from "@/utils/constant";
// eslint-disable-next-line
import { UserLayout, BasicLayout, RouteView, BlankLayout, PageView } from "@/layouts";

export const asyncRouterMap = [
  {
    path: "/",
    name: "index",
    component: BasicLayout,
    meta: { title: "首页" },
    redirect: "/company-info",
    children: [
      // 企业信息
      {
        path: "company-info",
        name: "companyInfo",
        component: () => import("@/views/companyInfo/index"),
        meta: {
          title: "企业信息",
          keepAlive: true,
          icon: "profile"
        }
      },
      // 岗位管理
      {
        path: "job-list",
        name: "jobList",
        component: () => import("@/views/jobList/index"),
        meta: {
          title: "岗位管理",
          keepAlive: true,
          icon: "table"
        }
      },
      // 企业中心
      {
        path: "company-center",
        name: "companyCenter",
        component: () => import("@/views/companyCenter/index"),
        meta: {
          title: "企业中心",
          keepAlive: true,
          icon: "check-circle-o"
        }
      }
    ]
  },
  {
    path: "*",
    redirect: "/404",
    hidden: true
  }
];

/**
 * 基础路由
 * @type { *[] }
 */
export const constantRouterMap = [
  {
    path: "/user",
    component: UserLayout,
    redirect: "/user/login",
    hidden: true,
    children: [
      {
        path: "login",
        name: "login",
        component: () => import(/* webpackChunkName: "user" */ "@/views/user/Login")
      },
      {
        path: "register",
        name: "register",
        component: () => import(/* webpackChunkName: "user" */ "@/views/user/Register")
      },
      {
        path: "register-result",
        name: "registerResult",
        component: () => import(/* webpackChunkName: "user" */ "@/views/user/RegisterResult")
      },
      {
        path: "recover",
        name: "recover",
        component: undefined
      }
    ]
  },
  {
    path: "/rule",
    component: () => import("@/views/rule")
  },
  {
    path: "/404",
    component: () => import(/* webpackChunkName: "fail" */ "@/views/exception/404")
  }
];
